------------------------------------------------------------------
--                           Position                           --
------------------------------------------------------------------
with Ada.Streams;

package Positions is

   type Position_Type is tagged limited private;
   type Position_Ref is access all Position_Type'Class;

   function Results (R : Score_Type) return Natural;

   function "-" (A, B : Position_Type) return Integer;

   function "=" (A, B : Position_Type) return Boolean;

   function Near(A, B : Position_Type) return Boolean;

   -- Not_Enough_Funds : exception;

private

   type Position_Type is tagged limited record
   	ID : Integer;
   	Row : Integer;
   	Col : Integer;
   end record;

   procedure My_Write (Stream : access Ada.Streams.Root_Stream_Type'Class;
                       Item   : in Position_Type);
   for Position_Type'Write use My_Write;

   procedure My_Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
                      Item   : out Position_Type);
   for Position_Type'Read use My_Read;

end Accounts;
